<?php
function putsFile($str)
{
    $file = fopen("result","w");
    if(!$file)
    {
	exit("open file failed");
    }
    fwrite($file,$str);
    fclose($file);
}


$a = $_REQUEST['num'];
putsFile($a);
header('Content-type:text/xml');
if( !is_numeric($a) )
{
    $a = "error";
}
echo "<count>$a</count>";

?>
